!\bin\bash

## return to parent directory
cd ..

### model list: VGG16 VGG19 ResNet18 ResNet34 LeNet GoogLeNet AlexNet NiN

# model_arch=ResNet18
# transfer_model_arch=NiN

########################################################
## Train model                                        ##
########################################################
##### CIFAR-10
# echo "python main.py --exp_type param --exp_case performance --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
# python main.py --exp_type param --exp_case performance --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch 

# model_arch=GoogLeNet

# echo "CUDA_VISIBLE_DEVICES=2 python main.py --exp_type param --exp_case performance --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
# CUDA_VISIBLE_DEVICES=2 python main.py --exp_type param --exp_case performance --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch 


########################################################
## experiment script                                  ##
########################################################
### model list: VGG16 VGG19 ResNet18 ResNet34 LeNet GoogLeNet AlexNet NiN
# model_arch=VGG16
# transfer_model_arch=VGG16

## case1: MPack test

##### Untarget attack
##### CIFAR-10
# for model_arch in VGG16 ResNet18
# do
#     for transfer_model_arch in VGG16 VGG19 ResNet18 ResNet34 LeNet GoogLeNet AlexNet NiN
#     do
#         echo "python main.py --exp_type transfer --exp_case case_transfer_untarget --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#         python main.py --exp_type transfer --exp_case case_transfer_untarget --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch 
#     done
# done


##### Target attack
##### CIFAR-10
# for model_arch in VGG16 ResNet18
# do
#     for transfer_model_arch in VGG16 VGG19 ResNet18 ResNet34 LeNet GoogLeNet AlexNet NiN
#     do
#         echo "python main.py --exp_type transfer --exp_case case_transfer_target --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#         python main.py --exp_type transfer --exp_case case_transfer_target --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#     done
# done

## case2: Speed
## objection list: GA, SMPack

###
### Untarget Attack  
###

# for model_arch in VGG16 ResNet18
# do
#     for transfer_model_arch in VGG16 ResNet18 
#     do
#         for exp_obj in SMPack GA
#         do
#             echo "python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#             python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#         done
#     done
# done


### model list: VGG16 VGG19 ResNet18 ResNet34 LeNet GoogLeNet AlexNet NiN

# for model_arch in VGG16 ResNet18
# do
#     for transfer_model_arch in VGG19 ResNet34
#     do
#         for exp_obj in SMPack GA
#         do
#             echo "python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#             python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#         done
#     done
# done


# for model_arch in VGG16 ResNet18
# do
#     for transfer_model_arch in AlexNet NiN
#     do
#         for exp_obj in SMPack GA
#         do
#             echo "python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#             python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#         done
#     done
# done


# for model_arch in VGG16
# do
#     for transfer_model_arch in LeNet 
#     do
#         for exp_obj in SMPack GA
#         do
#             echo "CUDA_VISIBLE_DEVICES=1 python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#             CUDA_VISIBLE_DEVICES=1 python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#         done
#     done
# done

## 进度
## ResNet18->LeNet->SMPack

# for model_arch in ResNet18
# do
#     for transfer_model_arch in LeNet 
#     do
#         for exp_obj in SMPack GA
#         do
#             echo "CUDA_VISIBLE_DEVICES=1 python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#             CUDA_VISIBLE_DEVICES=1 python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#         done
#     done
# done


# for model_arch in VGG16 ResNet18
# do
#     for transfer_model_arch in GoogLeNet 
#     do
#         for exp_obj in SMPack GA
#         do
#             echo "CUDA_VISIBLE_DEVICES=3 python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#             CUDA_VISIBLE_DEVICES=3 python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#         done
#     done
# done

###
###  Target Attack
###

## 进度
## VGG16->ResNet->GA

# for model_arch in VGG16 ResNet18
# do
#     for transfer_model_arch in VGG16 ResNet18 
#     do
#         for exp_obj in SMPack GA
#         do
#             if [ $model_arch = "VGG16" ] && [ $transfer_model_arch = "VGG16" ] && [ $exp_obj = "SMPack" ]; then
#                 echo "pass"
#             elif  [ $model_arch = "VGG16" ] && [ $transfer_model_arch = "VGG16" ] && [ $exp_obj = "GA" ]; then
#                 echo "pass"
#             elif  [ $model_arch = "VGG16" ] && [ $transfer_model_arch = "ResNet18" ] && [ $exp_obj = "SMPack" ]; then
#                 echo "pass"
#             else
#                 echo "python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_target_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
#                 python main.py --exp_obj $exp_obj --exp_type transfer --exp_case case_transfer_target_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch
#             fi
#         done
#     done
# done




########################################################
## Result script  MPack                               ##
########################################################

# model_arch=ResNet18
# transfer_model_arch=VGG16

# echo "python main.py  --exp_type transfer --exp_case case_transfer_untarget --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
# python main.py  --exp_type transfer --exp_case case_transfer_untarget --model_arch $model_arch --transfer_model_arch $transfer_model_arch


# echo "python main.py  --exp_type transfer --exp_case case_transfer_target --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
# python main.py  --exp_type transfer --exp_case case_transfer_target --model_arch $model_arch --transfer_model_arch $transfer_model_arch


########################################################
## Result script  PLot                                ##
########################################################

model_arch=VGG16
transfer_model_arch=VGG16

echo "python main.py  --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
python main.py  --exp_type transfer --exp_case case_transfer_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch


# echo "python main.py  --exp_type transfer --exp_case case_transfer_target_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch"
# python main.py  --exp_type transfer --exp_case case_transfer_target_speed --epsilon 0.05 --dataset CIFAR-10 --model_arch $model_arch --transfer_model_arch $transfer_model_arch











